#ifndef SQLITECONTENTDAO_H_
#define SQLITECONTENTDAO_H_

#include "../DAOFactory.h"
#include "../dao/ContentDAO.h"
#include "../../../util/exception/SQLiteException.h"

#include <sqlite3.h>
#include <sstream>
#include <ctime>

class SQLiteContentDAO: public ContentDAO {
private:
	sqlite3* database;
public:
	SQLiteContentDAO(sqlite3* database);
	virtual void save(const Content& content);
	virtual void update(const Content& content);
	virtual void remove(const Content& content);
	virtual Content loadContentById(int id);
	virtual Content loadContentByName(const std::string& name);
	virtual std::list<Content> loadAll();
	virtual int countAll();
};

#endif /* SQLITECONTENTDAO_H_ */
